
As a personal blogger who has been updating for more than 10 years, I have stepped on a lot of potholes in the early stage of building a blog. The most headache is the server bandwidth problem -- at the beginning with 1 core 1GB RAM, 1M bandwidth lightweight server, every time I post a new article, it is like experiencing a "traffic disaster": pictures load like a snail crawling, a few visitors slightly more than a few PPT, the background logs are full of timeout errors. The background log is full of timeout errors. Until I used StoneCDN, I realized that the original small water pipe can also run out of the "highway" effect! Just have not understood why the server itself bandwidth is very small, the use of CDN will be completely different?
explanation
A lot of friends who just started doing blogging (such as me back then), will choose this entry-level configuration: 1M bandwidth is like the home of the "tap water small water pipe", usually wash your hands, brush the dishes (a small number of visitors) is okay, once caught up with the whole family to take a shower (a little bit more traffic) on the water pressure is not enough.
Theoretically, 1M bandwidth can only transfer 128KB of data per second, and a high-definition picture can be more than 1MB, not to mention loading a dozen or so blog posts at the same time. I tried to access Li Yang's blog on my cell phone's 4G network without acceleration, and it took 8 seconds for the home page to load, which is not something anyone would have the patience to wait for! Then the CDN function is actually very simple: your blog's "hot commodities" (pictures, HTML, CSS and other static resources) stored in advance to the nearest user "convenience store". Users visit, directly to the convenience store downstairs to get goods, do not have to squeeze the small exit of your home warehouse.
When a Beijing reader opens my article, the image is not transmitted from a server in Guangzhou, but loaded directly from a local cdn node in Beijing, which is equivalent to buying a bottle of water in your neighborhood supermarket in 3 seconds;
There are only two things that go back to my home repository (back to the source server):
The convenience store is out of stock (for example, I just posted a new image and the node hasn't cached it yet), at which point EdgeOne will come to my server once to pick up the item, store it in the convenience store, and the next time other users won't have to wait;
Users need to "customize the service" (such as comments, login), these dynamic operations must be handled personally by my server, equivalent to the user to order a customized cake, have to go back to the head office to do it now.
Data comparisons are more intuitive:

Then some of you may ask, is it okay for me to buy servers without broadband?
The answer is: no! The head store has to take care of these 3 other things.
While the CDN helped me carry 90% of traffic, my 1M bandwidth server is still the "general store" and must be reserved to handle these 3 things:
Restocking the convenience store (back to source update): Every time I upload a new picture or update an article in "Li Yang's Blog", the node in EdgeOne will not cache it immediately, and will have to pull it from my server first. Just like the convenience store sold out of milk, you have to go back to the main store to buy goods, except that this "stocking" process only occurs when the new content is published, usually almost does not take up bandwidth.
Handling customized orders (dynamic content): visitor comments, form submission and these operations are equivalent to "customized goods", which must be handled by my server in real time. For example, if a user leaves a comment on my blog, the data has to be returned to my server for storage and then returned to the user, which will use a little bit of bandwidth, but the amount is very small -- I've done some statistics, and the daily traffic of dynamic requests only accounts for less than 5% of the total traffic.
Daily management channel: I have to log in to the server background to update blogs, backup data, and check logs, all through this "small water pipe". Although the bandwidth is small, it is enough for daily management, just like the Wi-Fi at home, it may be stuck to brush the video, but chatting WeChat and reading web pages are no problem at all.
best practice
Small configuration can also play a big pattern, the server will choose "light version", I now use or 1 nuclear 2GB memory, 1M bandwidth light server, monthly cost less than 50 dollars. Don't worry about the performance is not enough, CDN can directly help me filter 95% above the static resource request, the server CPU utilization rate is always lower than 10%, proper "fish state".
Use CDN to the extreme: turn on full cache: I set the cache time for blog posts and images to 30 days, and popular content almost always exists in the node, so that after the first visit of a new visitor, subsequent visits are seconds;
Compressing images to save traffic: CDN will automatically convert my JPG images to WebP format, which saves more traffic, shrinks the volume by 40%, and loads faster; monitoring the return data: through StoneCDN console, I can see that the return traffic is only a few hundred MB per day, which is completely manageable with 1M bandwidth.
Give visitors a better experience
Now when I open my blog, whether it's on a cell phone or a computer, whether it's at home or abroad, the images and text are "loading in seconds". Last week's statistics found that the average visitor's dwell time increased from the original 1 minute and 30 seconds to 3 minutes, and the bounce rate dropped by 60%--this is the direct benefit brought by the speed! Many new bloggers (including me) always think that a good blog requires a high quality server and large bandwidth, but in fact, it is not necessary at all! Like "Li Yang blog" such a personal site, with 1M bandwidth server with StoneCDN, you can easily cope with thousands of people visit at the same time, the annual cost of the server is less than 600 yuan.
Core logic in one sentence: StoneCDN help you to "physical work" (static resource transfer) all dry, your server only need to deal with "brain work" (dynamic logic), small water pipe can also run out of large traffic! If you are also worried about the speed of the blog, you may want to try this combination, so that your site from now on to say goodbye to the "lagging era" ~
Finally remind: even the best tools also need reasonable configuration, remember to adjust the caching strategy according to the type of content of their blog (static or dynamic), regularly check back to the source data, to ensure that the server and StoneCDN with a better understanding, in addition, you know what is the difference between CDN and responsible for equalization? Let's talk about it in the next issue.